home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 April: Mac OS SDK / Dev.CD Apr 00 SDK1.toast / Development Kits / Mac OS / ColorSync 3.0 Mac SDK / Interfaces / CMApplication.p < prev    next >
Encoding:
Text File  |  1999-10-28  |  50.8 KB  |  1,417 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        CMApplication.p
  3.  
  4.      Contains:    Color Matching Interfaces
  5.  
  6.      Version:    Technology:    ColorSync 3.0
  7.                  Release:    ColorSync 3.0 SDK for use with Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1992, 1994-1999 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. }
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT CMApplication;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __CMAPPLICATION__}
  27. {$SETC __CMAPPLICATION__ := 1}
  28.  
  29. {$I+}
  30. {$SETC CMApplicationIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33. {$IFC UNDEFINED __MACTYPES__}
  34. {$I MacTypes.p}
  35. {$ENDC}
  36. {$IFC UNDEFINED __QUICKDRAW__}
  37. {$I Quickdraw.p}
  38. {$ENDC}
  39. {$IFC UNDEFINED __FILES__}
  40. {$I Files.p}
  41. {$ENDC}
  42. {$IFC UNDEFINED __PRINTING__}
  43. {$I Printing.p}
  44. {$ENDC}
  45. {$IFC UNDEFINED __CMICCPROFILE__}
  46. {$I CMICCProfile.p}
  47. {$ENDC}
  48. {$IFC UNDEFINED __DISPLAYS__}
  49. {$I Displays.p}
  50. {$ENDC}
  51.  
  52.  
  53. {$PUSH}
  54. {$ALIGN MAC68K}
  55. {$LibExport+}
  56.  
  57.  
  58. CONST
  59.     kDefaultCMMSignature        = 'appl';
  60.  
  61. { Macintosh 68K trap word }
  62.     cmTrap                        = $ABEE;
  63.  
  64.  
  65. { PicComment IDs }
  66.     cmBeginProfile                = 220;
  67.     cmEndProfile                = 221;
  68.     cmEnableMatching            = 222;
  69.     cmDisableMatching            = 223;
  70.     cmComment                    = 224;
  71.  
  72. { PicComment selectors for cmComment }
  73.     cmBeginProfileSel            = 0;
  74.     cmContinueProfileSel        = 1;
  75.     cmEndProfileSel                = 2;
  76.     cmProfileIdentifierSel        = 3;
  77.  
  78.  
  79. { Defines for version 1.0 CMProfileSearchRecord.fieldMask }
  80.     cmMatchCMMType                = $00000001;
  81.     cmMatchApplProfileVersion    = $00000002;
  82.     cmMatchDataType                = $00000004;
  83.     cmMatchDeviceType            = $00000008;
  84.     cmMatchDeviceManufacturer    = $00000010;
  85.     cmMatchDeviceModel            = $00000020;
  86.     cmMatchDeviceAttributes        = $00000040;
  87.     cmMatchFlags                = $00000080;
  88.     cmMatchOptions                = $00000100;
  89.     cmMatchWhite                = $00000200;
  90.     cmMatchBlack                = $00000400;
  91.  
  92. { Defines for version 2.0 CMSearchRecord.searchMask }
  93.     cmMatchAnyProfile            = $00000000;
  94.     cmMatchProfileCMMType        = $00000001;
  95.     cmMatchProfileClass            = $00000002;
  96.     cmMatchDataColorSpace        = $00000004;
  97.     cmMatchProfileConnectionSpace = $00000008;
  98.     cmMatchManufacturer            = $00000010;
  99.     cmMatchModel                = $00000020;
  100.     cmMatchAttributes            = $00000040;
  101.     cmMatchProfileFlags            = $00000080;
  102.  
  103. { Result codes }
  104.                                                                 {  General Errors  }
  105.     cmProfileError                = -170;
  106.     cmMethodError                = -171;
  107.     cmMethodNotFound            = -175;                            {  CMM not present  }
  108.     cmProfileNotFound            = -176;                            {  Responder error  }
  109.     cmProfilesIdentical            = -177;                            {  Profiles the same  }
  110.     cmCantConcatenateError        = -178;                            {  Profile can't be concatenated  }
  111.     cmCantXYZ                    = -179;                            {  CMM cant handle XYZ space  }
  112.     cmCantDeleteProfile            = -180;                            {  Responder error  }
  113.     cmUnsupportedDataType        = -181;                            {  Responder error  }
  114.     cmNoCurrentProfile            = -182;                            {  Responder error  }
  115.                                                                 {  Profile Access Errors  }
  116.     cmElementTagNotFound        = -4200;
  117.     cmIndexRangeErr                = -4201;                        {  Tag index out of range  }
  118.     cmCantDeleteElement            = -4202;
  119.     cmFatalProfileErr            = -4203;
  120.     cmInvalidProfile            = -4204;                        {  A Profile must contain a 'cs1 ' tag to be valid  }
  121.     cmInvalidProfileLocation    = -4205;                        {  Operation not supported for this profile location  }
  122.     cmCantCopyModifiedV1Profile    = -4215;                        {  Illegal to copy version 1 profiles that have been modified  }
  123.                                                                 {  Profile Search Errors  }
  124.     cmInvalidSearch                = -4206;                        {  Bad Search Handle  }
  125.     cmSearchError                = -4207;
  126.     cmErrIncompatibleProfile    = -4208;                        {  Other ColorSync Errors  }
  127.     cmInvalidColorSpace            = -4209;                        {  Profile colorspace does not match bitmap type  }
  128.     cmInvalidSrcMap                = -4210;                        {  Source pix/bit map was invalid  }
  129.     cmInvalidDstMap                = -4211;                        {  Destination pix/bit map was invalid  }
  130.     cmNoGDevicesError            = -4212;                        {  Begin/End Matching -- no gdevices available  }
  131.     cmInvalidProfileComment        = -4213;                        {  Bad Profile comment during drawpicture  }
  132.     cmRangeOverFlow                = -4214;                        {  Color conversion warning that some output color values over/underflowed and were clipped  }
  133.     cmNamedColorNotFound        = -4216;                        {  NamedColor not found  }
  134.     cmCantGamutCheckError        = -4217;                        {  Gammut checking not supported by this ColorWorld  }
  135.  
  136. { deviceType values for ColorSync 1.0 Device Profile access }
  137.     cmSystemDevice                = 'sys ';
  138.     cmGDevice                    = 'gdev';
  139.  
  140. { Commands for CMFlattenUPP(…) }
  141.     cmOpenReadSpool                = 1;
  142.     cmOpenWriteSpool            = 2;
  143.     cmReadSpool                    = 3;
  144.     cmWriteSpool                = 4;
  145.     cmCloseSpool                = 5;
  146.  
  147. { Flags for PostScript-related functions }
  148.     cmPS7bit                    = 1;
  149.     cmPS8bit                    = 2;
  150.  
  151. { Flags for profile embedding functions }
  152.     cmEmbedWholeProfile            = $00000000;
  153.     cmEmbedProfileIdentifier    = $00000001;
  154.  
  155. { Commands for CMAccessUPP(…) }
  156.     cmOpenReadAccess            = 1;
  157.     cmOpenWriteAccess            = 2;
  158.     cmReadAccess                = 3;
  159.     cmWriteAccess                = 4;
  160.     cmCloseAccess                = 5;
  161.     cmCreateNewAccess            = 6;
  162.     cmAbortWriteAccess            = 7;
  163.     cmBeginAccess                = 8;
  164.     cmEndAccess                    = 9;
  165.  
  166.  
  167. { Abstract data type for memory-based Profile }
  168.  
  169. TYPE
  170.     CMProfileRef = ^LONGINT; { an opaque 32-bit type }
  171. { Abstract data type for Profile search result }
  172.     CMProfileSearchRef = ^LONGINT; { an opaque 32-bit type }
  173. { Abstract data type for BeginMatching(…) reference }
  174.     CMMatchRef = ^LONGINT; { an opaque 32-bit type }
  175. { Abstract data type for ColorWorld reference }
  176.     CMWorldRef = ^LONGINT; { an opaque 32-bit type }
  177. { Caller-supplied flatten function }
  178. {$IFC TYPED_FUNCTION_POINTERS}
  179.     CMFlattenProcPtr = FUNCTION(command: LONGINT; VAR size: LONGINT; data: UNIV Ptr; refCon: UNIV Ptr): OSErr;
  180. {$ELSEC}
  181.     CMFlattenProcPtr = ProcPtr;
  182. {$ENDC}
  183.  
  184. { Caller-supplied progress function for Bitmap & PixMap matching routines }
  185. {$IFC TYPED_FUNCTION_POINTERS}
  186.     CMBitmapCallBackProcPtr = FUNCTION(progress: LONGINT; refCon: UNIV Ptr): BOOLEAN;
  187. {$ELSEC}
  188.     CMBitmapCallBackProcPtr = ProcPtr;
  189. {$ENDC}
  190.  
  191. { Caller-supplied progress function for NCMMConcatInit & NCMMNewLinkProfile routines }
  192. {$IFC TYPED_FUNCTION_POINTERS}
  193.     CMConcatCallBackProcPtr = FUNCTION(progress: LONGINT; refCon: UNIV Ptr): BOOLEAN;
  194. {$ELSEC}
  195.     CMConcatCallBackProcPtr = ProcPtr;
  196. {$ENDC}
  197.  
  198. { Caller-supplied filter function for Profile search }
  199. {$IFC TYPED_FUNCTION_POINTERS}
  200.     CMProfileFilterProcPtr = FUNCTION(prof: CMProfileRef; refCon: UNIV Ptr): BOOLEAN;
  201. {$ELSEC}
  202.     CMProfileFilterProcPtr = ProcPtr;
  203. {$ENDC}
  204.  
  205. { Caller-supplied function for profile access }
  206. {$IFC TYPED_FUNCTION_POINTERS}
  207.     CMProfileAccessProcPtr = FUNCTION(command: LONGINT; offset: LONGINT; VAR size: LONGINT; data: UNIV Ptr; refCon: UNIV Ptr): OSErr;
  208. {$ELSEC}
  209.     CMProfileAccessProcPtr = ProcPtr;
  210. {$ENDC}
  211.  
  212.     CMFlattenUPP = UniversalProcPtr;
  213.     CMBitmapCallBackUPP = UniversalProcPtr;
  214.     CMConcatCallBackUPP = UniversalProcPtr;
  215.     CMProfileFilterUPP = UniversalProcPtr;
  216.     CMProfileAccessUPP = UniversalProcPtr;
  217.  
  218. CONST
  219.     uppCMFlattenProcInfo = $00003FE0;
  220.     uppCMBitmapCallBackProcInfo = $000003D0;
  221.     uppCMConcatCallBackProcInfo = $000003D0;
  222.     uppCMProfileFilterProcInfo = $000003D0;
  223.     uppCMProfileAccessProcInfo = $0000FFE0;
  224.  
  225. FUNCTION NewCMFlattenUPP(userRoutine: CMFlattenProcPtr): CMFlattenUPP; { old name was NewCMFlattenProc }
  226.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  227.     INLINE $2E9F;
  228.     {$ENDC}
  229.  
  230. FUNCTION NewCMBitmapCallBackUPP(userRoutine: CMBitmapCallBackProcPtr): CMBitmapCallBackUPP; { old name was NewCMBitmapCallBackProc }
  231.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  232.     INLINE $2E9F;
  233.     {$ENDC}
  234.  
  235. FUNCTION NewCMConcatCallBackUPP(userRoutine: CMConcatCallBackProcPtr): CMConcatCallBackUPP; { old name was NewCMConcatCallBackProc }
  236.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  237.     INLINE $2E9F;
  238.     {$ENDC}
  239.  
  240. FUNCTION NewCMProfileFilterUPP(userRoutine: CMProfileFilterProcPtr): CMProfileFilterUPP; { old name was NewCMProfileFilterProc }
  241.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  242.     INLINE $2E9F;
  243.     {$ENDC}
  244.  
  245. FUNCTION NewCMProfileAccessUPP(userRoutine: CMProfileAccessProcPtr): CMProfileAccessUPP; { old name was NewCMProfileAccessProc }
  246.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  247.     INLINE $2E9F;
  248.     {$ENDC}
  249.  
  250. PROCEDURE DisposeCMFlattenUPP(userUPP: CMFlattenUPP);
  251.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  252.     INLINE $594F;
  253.     {$ENDC}
  254.  
  255. PROCEDURE DisposeCMBitmapCallBackUPP(userUPP: CMBitmapCallBackUPP);
  256.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  257.     INLINE $594F;
  258.     {$ENDC}
  259.  
  260. PROCEDURE DisposeCMConcatCallBackUPP(userUPP: CMConcatCallBackUPP);
  261.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  262.     INLINE $594F;
  263.     {$ENDC}
  264.  
  265. PROCEDURE DisposeCMProfileFilterUPP(userUPP: CMProfileFilterUPP);
  266.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  267.     INLINE $594F;
  268.     {$ENDC}
  269.  
  270. PROCEDURE DisposeCMProfileAccessUPP(userUPP: CMProfileAccessUPP);
  271.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  272.     INLINE $594F;
  273.     {$ENDC}
  274.  
  275. FUNCTION InvokeCMFlattenUPP(command: LONGINT; VAR size: LONGINT; data: UNIV Ptr; refCon: UNIV Ptr; userRoutine: CMFlattenUPP): OSErr; { old name was CallCMFlattenProc }
  276.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  277.     INLINE $205F, $4E90;
  278.     {$ENDC}
  279.  
  280. FUNCTION InvokeCMBitmapCallBackUPP(progress: LONGINT; refCon: UNIV Ptr; userRoutine: CMBitmapCallBackUPP): BOOLEAN; { old name was CallCMBitmapCallBackProc }
  281.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  282.     INLINE $205F, $4E90;
  283.     {$ENDC}
  284.  
  285. FUNCTION InvokeCMConcatCallBackUPP(progress: LONGINT; refCon: UNIV Ptr; userRoutine: CMConcatCallBackUPP): BOOLEAN; { old name was CallCMConcatCallBackProc }
  286.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  287.     INLINE $205F, $4E90;
  288.     {$ENDC}
  289.  
  290. FUNCTION InvokeCMProfileFilterUPP(prof: CMProfileRef; refCon: UNIV Ptr; userRoutine: CMProfileFilterUPP): BOOLEAN; { old name was CallCMProfileFilterProc }
  291.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  292.     INLINE $205F, $4E90;
  293.     {$ENDC}
  294.  
  295. FUNCTION InvokeCMProfileAccessUPP(command: LONGINT; offset: LONGINT; VAR size: LONGINT; data: UNIV Ptr; refCon: UNIV Ptr; userRoutine: CMProfileAccessUPP): OSErr; { old name was CallCMProfileAccessProc }
  296.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  297.     INLINE $205F, $4E90;
  298.     {$ENDC}
  299.  
  300. TYPE
  301.     CMError                                = LONGINT;
  302. { For 1.0 and 2.0 profile header variants }
  303. { CMAppleProfileHeader }
  304.     CMAppleProfileHeaderPtr = ^CMAppleProfileHeader;
  305.     CMAppleProfileHeader = RECORD
  306.         CASE INTEGER OF
  307.         0: (
  308.             cm1:                CMHeader;
  309.             );
  310.         1: (
  311.             cm2:                CM2Header;
  312.             );
  313.     END;
  314.  
  315. { Param for CWConcatColorWorld(…) }
  316.     CMConcatProfileSetPtr = ^CMConcatProfileSet;
  317.     CMConcatProfileSet = RECORD
  318.         keyIndex:                UInt16;                                    {  Zero-based  }
  319.         count:                    UInt16;                                    {  Min 1  }
  320.         profileSet:                ARRAY [0..0] OF CMProfileRef;            {  Variable. Ordered from Source -> Dest  }
  321.     END;
  322.  
  323.  
  324. { NCMConcatProfileSpec Tags }
  325.  
  326. CONST
  327.     kNoTransform                = 0;                            {  Not used  }
  328.     kUseAtoB                    = 1;                            {  Use 'A2B*' tag from this profile or equivalent  }
  329.     kUseBtoA                    = 2;                            {  Use 'B2A*' tag from this profile or equivalent  }
  330.     kUseBtoB                    = 3;                            {  Use 'pre*' tag from this profile or equivalent  }
  331.                                                                 {  For typical device profiles the following synonyms may be useful  }
  332.     kDeviceToPCS                = 1;                            {  Device Dependent to Device Independent  }
  333.     kPCSToDevice                = 2;                            {  Device Independent to Device Dependent  }
  334.     kPCSToPCS                    = 3;                            {  Independent, through device's gamut  }
  335.     kUseProfileIntent            = $FFFFFFFF;                    {  For renderingIntent in NCMConcatProfileSpec     }
  336.  
  337. { NCMConcatProfileSpec }
  338.  
  339. TYPE
  340.     NCMConcatProfileSpecPtr = ^NCMConcatProfileSpec;
  341.     NCMConcatProfileSpec = RECORD
  342.         renderingIntent:        UInt32;                                    {  renderingIntent override         }
  343.         transformTag:            UInt32;                                    {  transformTag, defined above     }
  344.         profile:                CMProfileRef;                            {  profile  }
  345.     END;
  346.  
  347. { NCMConcatProfileSet }
  348.     NCMConcatProfileSetPtr = ^NCMConcatProfileSet;
  349.     NCMConcatProfileSet = RECORD
  350.         cmm:                    OSType;                                    {  e.g. 'KCMS', 'appl', ...  uniquely ids the cmm, or 0000  }
  351.         flags:                    UInt32;                                    {  specify quality, lookup only, no gamut checking ...  }
  352.         flagsMask:                UInt32;                                    {  which bits of 'flags' to use to override profile  }
  353.         profileCount:            UInt32;                                    {  how many ProfileSpecs in the following set  }
  354.         profileSpecs:            ARRAY [0..0] OF NCMConcatProfileSpec;    {  Variable. Ordered from Source -> Dest  }
  355.     END;
  356.  
  357. { ColorSync color data types }
  358.     CMRGBColorPtr = ^CMRGBColor;
  359.     CMRGBColor = RECORD
  360.         red:                    UInt16;                                    {  0..65535  }
  361.         green:                    UInt16;
  362.         blue:                    UInt16;
  363.     END;
  364.  
  365.     CMCMYKColorPtr = ^CMCMYKColor;
  366.     CMCMYKColor = RECORD
  367.         cyan:                    UInt16;                                    {  0..65535  }
  368.         magenta:                UInt16;
  369.         yellow:                    UInt16;
  370.         black:                    UInt16;
  371.     END;
  372.  
  373.     CMCMYColorPtr = ^CMCMYColor;
  374.     CMCMYColor = RECORD
  375.         cyan:                    UInt16;                                    {  0..65535  }
  376.         magenta:                UInt16;
  377.         yellow:                    UInt16;
  378.     END;
  379.  
  380.     CMHLSColorPtr = ^CMHLSColor;
  381.     CMHLSColor = RECORD
  382.         hue:                    UInt16;                                    {  0..65535. Fraction of circle. Red at 0  }
  383.         lightness:                UInt16;                                    {  0..65535  }
  384.         saturation:                UInt16;                                    {  0..65535  }
  385.     END;
  386.  
  387.     CMHSVColorPtr = ^CMHSVColor;
  388.     CMHSVColor = RECORD
  389.         hue:                    UInt16;                                    {  0..65535. Fraction of circle. Red at 0  }
  390.         saturation:                UInt16;                                    {  0..65535  }
  391.         value:                    UInt16;                                    {  0..65535  }
  392.     END;
  393.  
  394.     CMLabColorPtr = ^CMLabColor;
  395.     CMLabColor = RECORD
  396.         L:                        UInt16;                                    {  0..65535 maps to 0..100  }
  397.         a:                        UInt16;                                    {  0..65535 maps to -128..127.996  }
  398.         b:                        UInt16;                                    {  0..65535 maps to -128..127.996  }
  399.     END;
  400.  
  401.     CMLuvColorPtr = ^CMLuvColor;
  402.     CMLuvColor = RECORD
  403.         L:                        UInt16;                                    {  0..65535 maps to 0..100  }
  404.         u:                        UInt16;                                    {  0..65535 maps to -128..127.996  }
  405.         v:                        UInt16;                                    {  0..65535 maps to -128..127.996  }
  406.     END;
  407.  
  408.     CMYxyColorPtr = ^CMYxyColor;
  409.     CMYxyColor = RECORD
  410.         capY:                    UInt16;                                    {  0..65535 maps to 0..1  }
  411.         x:                        UInt16;                                    {  0..65535 maps to 0..1  }
  412.         y:                        UInt16;                                    {  0..65535 maps to 0..1  }
  413.     END;
  414.  
  415.     CMGrayColorPtr = ^CMGrayColor;
  416.     CMGrayColor = RECORD
  417.         gray:                    UInt16;                                    {  0..65535  }
  418.     END;
  419.  
  420.     CMMultichannel5ColorPtr = ^CMMultichannel5Color;
  421.     CMMultichannel5Color = RECORD
  422.         components:                PACKED ARRAY [0..4] OF UInt8;            {  0..255  }
  423.     END;
  424.  
  425.     CMMultichannel6ColorPtr = ^CMMultichannel6Color;
  426.     CMMultichannel6Color = RECORD
  427.         components:                PACKED ARRAY [0..5] OF UInt8;            {  0..255  }
  428.     END;
  429.  
  430.     CMMultichannel7ColorPtr = ^CMMultichannel7Color;
  431.     CMMultichannel7Color = RECORD
  432.         components:                PACKED ARRAY [0..6] OF UInt8;            {  0..255  }
  433.     END;
  434.  
  435.     CMMultichannel8ColorPtr = ^CMMultichannel8Color;
  436.     CMMultichannel8Color = RECORD
  437.         components:                PACKED ARRAY [0..7] OF UInt8;            {  0..255  }
  438.     END;
  439.  
  440.     CMNamedColorPtr = ^CMNamedColor;
  441.     CMNamedColor = RECORD
  442.         namedColorIndex:        UInt32;                                    {  0..a lot  }
  443.     END;
  444.  
  445.     CMColorPtr = ^CMColor;
  446.     CMColor = RECORD
  447.         CASE INTEGER OF
  448.         0: (
  449.             rgb:                CMRGBColor;
  450.             );
  451.         1: (
  452.             hsv:                CMHSVColor;
  453.             );
  454.         2: (
  455.             hls:                CMHLSColor;
  456.             );
  457.         3: (
  458.             XYZ:                CMXYZColor;
  459.             );
  460.         4: (
  461.             Lab:                CMLabColor;
  462.             );
  463.         5: (
  464.             Luv:                CMLuvColor;
  465.             );
  466.         6: (
  467.             Yxy:                CMYxyColor;
  468.             );
  469.         7: (
  470.             cmyk:                CMCMYKColor;
  471.             );
  472.         8: (
  473.             cmy:                CMCMYColor;
  474.             );
  475.         9: (
  476.             gray:                CMGrayColor;
  477.             );
  478.         10: (
  479.             mc5:                CMMultichannel5Color;
  480.             );
  481.         11: (
  482.             mc6:                CMMultichannel6Color;
  483.             );
  484.         12: (
  485.             mc7:                CMMultichannel7Color;
  486.             );
  487.         13: (
  488.             mc8:                CMMultichannel8Color;
  489.             );
  490.         14: (
  491.             namedColor:            CMNamedColor;
  492.             );
  493.     END;
  494.  
  495.     CMProfileSearchRecordPtr = ^CMProfileSearchRecord;
  496.     CMProfileSearchRecord = RECORD
  497.         header:                    CMHeader;
  498.         fieldMask:                UInt32;
  499.         reserved:                ARRAY [0..1] OF UInt32;
  500.     END;
  501.  
  502.     CMProfileSearchRecordHandle            = ^CMProfileSearchRecordPtr;
  503. { Search definition for 2.0 }
  504.     CMSearchRecordPtr = ^CMSearchRecord;
  505.     CMSearchRecord = RECORD
  506.         CMMType:                OSType;
  507.         profileClass:            OSType;
  508.         dataColorSpace:            OSType;
  509.         profileConnectionSpace:    OSType;
  510.         deviceManufacturer:        UInt32;
  511.         deviceModel:            UInt32;
  512.         deviceAttributes:        ARRAY [0..1] OF UInt32;
  513.         profileFlags:            UInt32;
  514.         searchMask:                UInt32;
  515.         filter:                    CMProfileFilterUPP;
  516.     END;
  517.  
  518. { CMMInfo structure }
  519.     CMMInfoPtr = ^CMMInfo;
  520.     CMMInfo = RECORD
  521.         dataSize:                UInt32;                                    {  Size of this structure - compatibility }
  522.         CMMType:                OSType;                                    {  Signature, e.g. 'KCMS' }
  523.         CMMMfr:                    OSType;                                    {  Vendor, e.g. 'appl' }
  524.         CMMVersion:                UInt32;                                    {  cmm version number }
  525.         ASCIIName:                PACKED ARRAY [0..31] OF UInt8;            {  pascal string - name }
  526.         ASCIIDesc:                PACKED ARRAY [0..255] OF UInt8;            {  pascal string - description or copyright }
  527.         UniCodeNameCount:        UniCharCount;                            {  count of UniChars in following array }
  528.         UniCodeName:            ARRAY [0..31] OF UniChar;                {  the name in UniCode chars }
  529.         UniCodeDescCount:        UniCharCount;                            {  count of UniChars in following array }
  530.         UniCodeDesc:            ARRAY [0..255] OF UniChar;                {  the description in UniCode chars }
  531.     END;
  532.  
  533. { GetCWInfo structures }
  534.     CMMInfoRecordPtr = ^CMMInfoRecord;
  535.     CMMInfoRecord = RECORD
  536.         CMMType:                OSType;
  537.         CMMVersion:                LONGINT;
  538.     END;
  539.  
  540.     CMCWInfoRecordPtr = ^CMCWInfoRecord;
  541.     CMCWInfoRecord = RECORD
  542.         cmmCount:                UInt32;
  543.         cmmInfo:                ARRAY [0..1] OF CMMInfoRecord;
  544.     END;
  545.  
  546. { profile identifier structures }
  547.     CMProfileIdentifierPtr = ^CMProfileIdentifier;
  548.     CMProfileIdentifier = RECORD
  549.         profileHeader:            CM2Header;
  550.         calibrationDate:        CMDateTime;
  551.         ASCIIProfileDescriptionLen: UInt32;
  552.         ASCIIProfileDescription: SInt8;                                    {  variable length  }
  553.     END;
  554.  
  555. { packing formats }
  556.  
  557. CONST
  558.     cmNoColorPacking            = $0000;
  559.     cmWord5ColorPacking            = $0500;
  560.     cmWord565ColorPacking        = $0600;
  561.     cmLong8ColorPacking            = $0800;
  562.     cmLong10ColorPacking        = $0A00;
  563.     cmAlphaFirstPacking            = $1000;
  564.     cmOneBitDirectPacking        = $0B00;
  565.     cmAlphaLastPacking            = $0000;
  566.     cm8_8ColorPacking            = $2800;
  567.     cm16_8ColorPacking            = $2000;
  568.     cm24_8ColorPacking            = $2100;
  569.     cm32_8ColorPacking            = $0800;
  570.     cm40_8ColorPacking            = $2200;
  571.     cm48_8ColorPacking            = $2300;
  572.     cm56_8ColorPacking            = $2400;
  573.     cm64_8ColorPacking            = $2500;
  574.     cm32_16ColorPacking            = $2600;
  575.     cm48_16ColorPacking            = $2900;
  576.     cm64_16ColorPacking            = $2A00;
  577.     cm32_32ColorPacking            = $2700;
  578.     cmLittleEndianPacking        = $4000;
  579.     cmReverseChannelPacking        = $8000;
  580.  
  581. { colorspace masks }
  582.     cmColorSpaceSpaceMask        = $0000007F;
  583.     cmColorSpaceAlphaMask        = $00000080;
  584.     cmColorSpaceSpaceAndAlphaMask = $000000FF;
  585.     cmColorSpacePackingMask        = $0000FF00;
  586.     cmColorSpaceReservedMask    = $FFFF0000;
  587.  
  588. { general colorspaces }
  589.     cmNoSpace                    = 0;
  590.     cmRGBSpace                    = 1;
  591.     cmCMYKSpace                    = 2;
  592.     cmHSVSpace                    = 3;
  593.     cmHLSSpace                    = 4;
  594.     cmYXYSpace                    = 5;
  595.     cmXYZSpace                    = 6;
  596.     cmLUVSpace                    = 7;
  597.     cmLABSpace                    = 8;
  598.     cmReservedSpace1            = 9;
  599.     cmGraySpace                    = 10;
  600.     cmReservedSpace2            = 11;
  601.     cmGamutResultSpace            = 12;
  602.     cmNamedIndexedSpace            = 16;
  603.     cmMCFiveSpace                = 17;
  604.     cmMCSixSpace                = 18;
  605.     cmMCSevenSpace                = 19;
  606.     cmMCEightSpace                = 20;
  607.     cmAlphaSpace                = $80;
  608.     cmRGBASpace                    = 129;
  609.     cmGrayASpace                = 138;
  610.  
  611. { supported CMBitmapColorSpaces - Each of the following is a }
  612. { combination of a general colospace and a packing formats. }
  613. { Each can also be or'd with cmReverseChannelPacking. }
  614.     cmGray8Space                = 10250;
  615.     cmGrayA16Space                = 8330;
  616.     cmGray16Space                = 10;
  617.     cmGrayA32Space                = 138;
  618.     cmGray16LSpace                = 16394;
  619.     cmGrayA32LSpace                = 16522;
  620.     cmRGB16Space                = 1281;
  621.     cmRGB16LSpace                = 17665;
  622.     cmRGB565Space                = 1537;
  623.     cmRGB565LSpace                = 17921;
  624.     cmRGB24Space                = 8449;
  625.     cmRGB32Space                = 2049;
  626.     cmRGB48Space                = 10497;
  627.     cmRGB48LSpace                = 26881;
  628.     cmARGB32Space                = 6273;
  629.     cmARGB64Space                = 14977;
  630.     cmARGB64LSpace                = 31361;
  631.     cmRGBA32Space                = 2177;
  632.     cmRGBA64Space                = 10881;
  633.     cmRGBA64LSpace                = 27265;
  634.     cmCMYK32Space                = 2050;
  635.     cmCMYK64Space                = 10754;
  636.     cmCMYK64LSpace                = 27138;
  637.     cmHSV32Space                = 2563;
  638.     cmHLS32Space                = 2564;
  639.     cmYXY32Space                = 2565;
  640.     cmXYZ24Space                = 8454;
  641.     cmXYZ32Space                = 2566;
  642.     cmXYZ48Space                = 10502;
  643.     cmXYZ48LSpace                = 26886;
  644.     cmLUV32Space                = 2567;
  645.     cmLAB24Space                = 8456;
  646.     cmLAB32Space                = 2568;
  647.     cmLAB48Space                = 10504;
  648.     cmLAB48LSpace                = 26888;
  649.     cmGamutResult1Space            = $0B0C;
  650.     cmNamedIndexed32Space        = $2710;
  651.     cmNamedIndexed32LSpace        = $6710;
  652.     cmMCFive8Space                = $2211;
  653.     cmMCSix8Space                = $2312;
  654.     cmMCSeven8Space                = $2413;
  655.     cmMCEight8Space                = $2514;
  656.  
  657.  
  658.  
  659. TYPE
  660.     CMBitmapColorSpace                    = UInt32;
  661.     CMBitmapPtr = ^CMBitmap;
  662.     CMBitmap = RECORD
  663.         image:                    CStringPtr;
  664.         width:                    LONGINT;
  665.         height:                    LONGINT;
  666.         rowBytes:                LONGINT;
  667.         pixelSize:                LONGINT;
  668.         space:                    CMBitmapColorSpace;
  669.         user1:                    LONGINT;
  670.         user2:                    LONGINT;
  671.     END;
  672.  
  673.  
  674. { Classic Print Manager Stuff }
  675. {$IFC TARGET_OS_MAC }
  676.  
  677. CONST
  678.     enableColorMatchingOp        = 12;
  679.     registerProfileOp            = 13;
  680.  
  681. {$ENDC}  {TARGET_OS_MAC}
  682.  
  683. { Profile Locations }
  684.  
  685. CONST
  686.     CS_MAX_PATH                    = 256;
  687.  
  688.     cmNoProfileBase                = 0;
  689.     cmFileBasedProfile            = 1;
  690.     cmHandleBasedProfile        = 2;
  691.     cmPtrBasedProfile            = 3;
  692.     cmProcedureBasedProfile        = 4;
  693.     cmPathBasedProfile            = 5;
  694.     cmBufferBasedProfile        = 6;
  695.  
  696.  
  697. TYPE
  698.     CMFileLocationPtr = ^CMFileLocation;
  699.     CMFileLocation = RECORD
  700.         spec:                    FSSpec;
  701.     END;
  702.  
  703.     CMHandleLocationPtr = ^CMHandleLocation;
  704.     CMHandleLocation = RECORD
  705.         h:                        Handle;
  706.     END;
  707.  
  708.     CMPtrLocationPtr = ^CMPtrLocation;
  709.     CMPtrLocation = RECORD
  710.         p:                        Ptr;
  711.     END;
  712.  
  713.     CMProcedureLocationPtr = ^CMProcedureLocation;
  714.     CMProcedureLocation = RECORD
  715.         proc:                    CMProfileAccessUPP;
  716.         refCon:                    Ptr;
  717.     END;
  718.  
  719.     CMPathLocationPtr = ^CMPathLocation;
  720.     CMPathLocation = RECORD
  721.         path:                    PACKED ARRAY [0..255] OF CHAR;
  722.     END;
  723.  
  724.     CMBufferLocationPtr = ^CMBufferLocation;
  725.     CMBufferLocation = RECORD
  726.         buffer:                    Ptr;
  727.         size:                    UInt32;
  728.     END;
  729.  
  730.     CMProfLocPtr = ^CMProfLoc;
  731.     CMProfLoc = RECORD
  732.         CASE INTEGER OF
  733.         0: (
  734.             fileLoc:            CMFileLocation;
  735.             );
  736.         1: (
  737.             handleLoc:            CMHandleLocation;
  738.             );
  739.         2: (
  740.             ptrLoc:                CMPtrLocation;
  741.             );
  742.         3: (
  743.             procLoc:            CMProcedureLocation;
  744.             );
  745.         4: (
  746.             pathLoc:            CMPathLocation;
  747.             );
  748.         5: (
  749.             bufferLoc:            CMBufferLocation;
  750.             );
  751.     END;
  752.  
  753.     CMProfileLocationPtr = ^CMProfileLocation;
  754.     CMProfileLocation = RECORD
  755.         locType:                INTEGER;
  756.         u:                        CMProfLoc;
  757.     END;
  758.  
  759. {$IFC TARGET_OS_MAC }
  760.  
  761. CONST
  762.     cmOriginalProfileLocationSize = 72;
  763.     cmCurrentProfileLocationSize = 258;
  764.  
  765. {$ELSEC}
  766.  
  767. CONST
  768.     cmOriginalProfileLocationSize = 258;
  769.     cmCurrentProfileLocationSize = 258;
  770.  
  771. {$ENDC}  {TARGET_OS_MAC}
  772.  
  773. { Struct and enums used for Profile iteration }
  774.     cmProfileIterateDataVersion1 = $00010000;
  775.     cmProfileIterateDataVersion2 = $00020000;
  776.  
  777.  
  778. TYPE
  779.     CMProfileIterateDataPtr = ^CMProfileIterateData;
  780.     CMProfileIterateData = RECORD
  781.         dataVersion:            UInt32;                                    {  cmProfileIterateDataVersion2  }
  782.         header:                    CM2Header;
  783.         code:                    ScriptCode;
  784.         name:                    Str255;
  785.         location:                CMProfileLocation;
  786.         uniCodeNameCount:        UniCharCount;
  787.         uniCodeName:            UniCharPtr;
  788.         asciiName:                Ptr;
  789.         makeAndModel:            CMMakeAndModelPtr;
  790.     END;
  791.  
  792. { Caller-supplied callback function for Profile & CMM iteration }
  793. {$IFC TYPED_FUNCTION_POINTERS}
  794.     CMProfileIterateProcPtr = FUNCTION(VAR iterateData: CMProfileIterateData; refCon: UNIV Ptr): OSErr;
  795. {$ELSEC}
  796.     CMProfileIterateProcPtr = ProcPtr;
  797. {$ENDC}
  798.  
  799. {$IFC TYPED_FUNCTION_POINTERS}
  800.     CMMIterateProcPtr = FUNCTION(VAR iterateData: CMMInfo; refCon: UNIV Ptr): OSErr;
  801. {$ELSEC}
  802.     CMMIterateProcPtr = ProcPtr;
  803. {$ENDC}
  804.  
  805.     CMProfileIterateUPP = UniversalProcPtr;
  806.     CMMIterateUPP = UniversalProcPtr;
  807.  
  808. CONST
  809.     uppCMProfileIterateProcInfo = $000003E0;
  810.     uppCMMIterateProcInfo = $000003E0;
  811.  
  812. FUNCTION NewCMProfileIterateUPP(userRoutine: CMProfileIterateProcPtr): CMProfileIterateUPP; { old name was NewCMProfileIterateProc }
  813.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  814.     INLINE $2E9F;
  815.     {$ENDC}
  816.  
  817. FUNCTION NewCMMIterateUPP(userRoutine: CMMIterateProcPtr): CMMIterateUPP; { old name was NewCMMIterateProc }
  818.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  819.     INLINE $2E9F;
  820.     {$ENDC}
  821.  
  822. PROCEDURE DisposeCMProfileIterateUPP(userUPP: CMProfileIterateUPP);
  823.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  824.     INLINE $594F;
  825.     {$ENDC}
  826.  
  827. PROCEDURE DisposeCMMIterateUPP(userUPP: CMMIterateUPP);
  828.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  829.     INLINE $594F;
  830.     {$ENDC}
  831.  
  832. FUNCTION InvokeCMProfileIterateUPP(VAR iterateData: CMProfileIterateData; refCon: UNIV Ptr; userRoutine: CMProfileIterateUPP): OSErr; { old name was CallCMProfileIterateProc }
  833.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  834.     INLINE $205F, $4E90;
  835.     {$ENDC}
  836.  
  837. FUNCTION InvokeCMMIterateUPP(VAR iterateData: CMMInfo; refCon: UNIV Ptr; userRoutine: CMMIterateUPP): OSErr; { old name was CallCMMIterateProc }
  838.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  839.     INLINE $205F, $4E90;
  840.     {$ENDC}
  841. { Profile file and element access }
  842. FUNCTION CMNewProfile(VAR prof: CMProfileRef; {CONST}VAR theProfile: CMProfileLocation): CMError;
  843.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  844.     INLINE $203C, $0008, $001B, $ABEE;
  845.     {$ENDC}
  846. FUNCTION CMOpenProfile(VAR prof: CMProfileRef; {CONST}VAR theProfile: CMProfileLocation): CMError;
  847.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  848.     INLINE $203C, $0008, $001C, $ABEE;
  849.     {$ENDC}
  850. FUNCTION CMCloseProfile(prof: CMProfileRef): CMError;
  851.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  852.     INLINE $203C, $0004, $001D, $ABEE;
  853.     {$ENDC}
  854. FUNCTION CMUpdateProfile(prof: CMProfileRef): CMError;
  855.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  856.     INLINE $203C, $0004, $0034, $ABEE;
  857.     {$ENDC}
  858. FUNCTION CMCopyProfile(VAR targetProf: CMProfileRef; {CONST}VAR targetLocation: CMProfileLocation; srcProf: CMProfileRef): CMError;
  859.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  860.     INLINE $203C, $000C, $0025, $ABEE;
  861.     {$ENDC}
  862. FUNCTION CMValidateProfile(prof: CMProfileRef; VAR valid: BOOLEAN; VAR preferredCMMnotfound: BOOLEAN): CMError;
  863.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  864.     INLINE $203C, $000C, $0026, $ABEE;
  865.     {$ENDC}
  866. FUNCTION CMGetProfileLocation(prof: CMProfileRef; VAR theProfile: CMProfileLocation): CMError;
  867.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  868.     INLINE $203C, $0008, $003C, $ABEE;
  869.     {$ENDC}
  870. FUNCTION NCMGetProfileLocation(prof: CMProfileRef; VAR theProfile: CMProfileLocation; VAR locationSize: UInt32): CMError;
  871.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  872.     INLINE $203C, $000C, $0059, $ABEE;
  873.     {$ENDC}
  874. FUNCTION CMFlattenProfile(prof: CMProfileRef; flags: UInt32; proc: CMFlattenUPP; refCon: UNIV Ptr; VAR preferredCMMnotfound: BOOLEAN): CMError;
  875.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  876.     INLINE $203C, $0014, $0031, $ABEE;
  877.     {$ENDC}
  878. {$IFC TARGET_OS_MAC }
  879. FUNCTION CMUnflattenProfile(VAR resultFileSpec: FSSpec; proc: CMFlattenUPP; refCon: UNIV Ptr; VAR preferredCMMnotfound: BOOLEAN): CMError;
  880.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  881.     INLINE $203C, $0010, $0032, $ABEE;
  882.     {$ENDC}
  883. {$ENDC}  {TARGET_OS_MAC}
  884.  
  885. FUNCTION CMGetProfileHeader(prof: CMProfileRef; VAR header: CMAppleProfileHeader): CMError;
  886.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  887.     INLINE $203C, $0008, $0039, $ABEE;
  888.     {$ENDC}
  889. FUNCTION CMSetProfileHeader(prof: CMProfileRef; {CONST}VAR header: CMAppleProfileHeader): CMError;
  890.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  891.     INLINE $203C, $0008, $003A, $ABEE;
  892.     {$ENDC}
  893. FUNCTION CMProfileElementExists(prof: CMProfileRef; tag: OSType; VAR found: BOOLEAN): CMError;
  894.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  895.     INLINE $203C, $000C, $001E, $ABEE;
  896.     {$ENDC}
  897. FUNCTION CMCountProfileElements(prof: CMProfileRef; VAR elementCount: UInt32): CMError;
  898.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  899.     INLINE $203C, $0008, $001F, $ABEE;
  900.     {$ENDC}
  901. FUNCTION CMGetProfileElement(prof: CMProfileRef; tag: OSType; VAR elementSize: UInt32; elementData: UNIV Ptr): CMError;
  902.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  903.     INLINE $203C, $0010, $0020, $ABEE;
  904.     {$ENDC}
  905. FUNCTION CMSetProfileElement(prof: CMProfileRef; tag: OSType; elementSize: UInt32; elementData: UNIV Ptr): CMError;
  906.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  907.     INLINE $203C, $0010, $0023, $ABEE;
  908.     {$ENDC}
  909. FUNCTION CMSetProfileElementSize(prof: CMProfileRef; tag: OSType; elementSize: UInt32): CMError;
  910.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  911.     INLINE $203C, $000C, $0038, $ABEE;
  912.     {$ENDC}
  913. FUNCTION CMSetProfileElementReference(prof: CMProfileRef; elementTag: OSType; referenceTag: OSType): CMError;
  914.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  915.     INLINE $203C, $000C, $0035, $ABEE;
  916.     {$ENDC}
  917. FUNCTION CMGetPartialProfileElement(prof: CMProfileRef; tag: OSType; offset: UInt32; VAR byteCount: UInt32; elementData: UNIV Ptr): CMError;
  918.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  919.     INLINE $203C, $0014, $0036, $ABEE;
  920.     {$ENDC}
  921. FUNCTION CMSetPartialProfileElement(prof: CMProfileRef; tag: OSType; offset: UInt32; byteCount: UInt32; elementData: UNIV Ptr): CMError;
  922.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  923.     INLINE $203C, $0014, $0037, $ABEE;
  924.     {$ENDC}
  925. FUNCTION CMGetIndProfileElementInfo(prof: CMProfileRef; index: UInt32; VAR tag: OSType; VAR elementSize: UInt32; VAR refs: BOOLEAN): CMError;
  926.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  927.     INLINE $203C, $0014, $0021, $ABEE;
  928.     {$ENDC}
  929. FUNCTION CMGetIndProfileElement(prof: CMProfileRef; index: UInt32; VAR elementSize: UInt32; elementData: UNIV Ptr): CMError;
  930.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  931.     INLINE $203C, $0010, $0022, $ABEE;
  932.     {$ENDC}
  933. FUNCTION CMRemoveProfileElement(prof: CMProfileRef; tag: OSType): CMError;
  934.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  935.     INLINE $203C, $0008, $0024, $ABEE;
  936.     {$ENDC}
  937. FUNCTION CMGetScriptProfileDescription(prof: CMProfileRef; VAR name: Str255; VAR code: ScriptCode): CMError;
  938.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  939.     INLINE $203C, $000C, $003E, $ABEE;
  940.     {$ENDC}
  941. FUNCTION CMGetProfileDescriptions(prof: CMProfileRef; aName: CStringPtr; VAR aCount: UInt32; VAR mName: Str255; VAR mCode: ScriptCode; VAR uName: UniChar; VAR uCount: UniCharCount): CMError;
  942.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  943.     INLINE $203C, $001A, $0067, $ABEE;
  944.     {$ENDC}
  945. FUNCTION CMSetProfileDescriptions(prof: CMProfileRef; aName: ConstCStringPtr; aCount: UInt32; mName: Str255; mCode: ScriptCode; {CONST}VAR uName: UniChar; uCount: UniCharCount): CMError;
  946.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  947.     INLINE $203C, $001A, $0068, $ABEE;
  948.     {$ENDC}
  949. FUNCTION CMCloneProfileRef(prof: CMProfileRef): CMError;
  950.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  951.     INLINE $203C, $0004, $0042, $ABEE;
  952.     {$ENDC}
  953. FUNCTION CMGetProfileRefCount(prof: CMProfileRef; VAR count: LONGINT): CMError;
  954.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  955.     INLINE $203C, $0008, $0043, $ABEE;
  956.     {$ENDC}
  957. FUNCTION CMProfileModified(prof: CMProfileRef; VAR modified: BOOLEAN): CMError;
  958.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  959.     INLINE $203C, $0008, $0044, $ABEE;
  960.     {$ENDC}
  961.  
  962. { named Color access functions }
  963. FUNCTION CMGetNamedColorInfo(prof: CMProfileRef; VAR deviceChannels: UInt32; VAR deviceColorSpace: OSType; VAR PCSColorSpace: OSType; VAR count: UInt32; prefix: StringPtr; suffix: StringPtr): CMError;
  964.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  965.     INLINE $203C, $001C, $0046, $ABEE;
  966.     {$ENDC}
  967. FUNCTION CMGetNamedColorValue(prof: CMProfileRef; name: StringPtr; VAR deviceColor: CMColor; VAR PCSColor: CMColor): CMError;
  968.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  969.     INLINE $203C, $0010, $0047, $ABEE;
  970.     {$ENDC}
  971. FUNCTION CMGetIndNamedColorValue(prof: CMProfileRef; index: UInt32; VAR deviceColor: CMColor; VAR PCSColor: CMColor): CMError;
  972.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  973.     INLINE $203C, $0010, $0048, $ABEE;
  974.     {$ENDC}
  975. FUNCTION CMGetNamedColorIndex(prof: CMProfileRef; name: StringPtr; VAR index: UInt32): CMError;
  976.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  977.     INLINE $203C, $000C, $0049, $ABEE;
  978.     {$ENDC}
  979. FUNCTION CMGetNamedColorName(prof: CMProfileRef; index: UInt32; name: StringPtr): CMError;
  980.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  981.     INLINE $203C, $000C, $004A, $ABEE;
  982.     {$ENDC}
  983.  
  984. { General-purpose matching functions }
  985. FUNCTION NCWNewColorWorld(VAR cw: CMWorldRef; src: CMProfileRef; dst: CMProfileRef): CMError;
  986.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  987.     INLINE $203C, $000C, $0014, $ABEE;
  988.     {$ENDC}
  989. FUNCTION CWConcatColorWorld(VAR cw: CMWorldRef; VAR profileSet: CMConcatProfileSet): CMError;
  990.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  991.     INLINE $203C, $0008, $0015, $ABEE;
  992.     {$ENDC}
  993. FUNCTION CWNewLinkProfile(VAR prof: CMProfileRef; {CONST}VAR targetLocation: CMProfileLocation; VAR profileSet: CMConcatProfileSet): CMError;
  994.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  995.     INLINE $203C, $000C, $0033, $ABEE;
  996.     {$ENDC}
  997. FUNCTION NCWConcatColorWorld(VAR cw: CMWorldRef; VAR profileSet: NCMConcatProfileSet; proc: CMConcatCallBackUPP; refCon: UNIV Ptr): CMError;
  998.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  999.     INLINE $203C, $0008, $0061, $ABEE;
  1000.     {$ENDC}
  1001. FUNCTION NCWNewLinkProfile(VAR prof: CMProfileRef; {CONST}VAR targetLocation: CMProfileLocation; VAR profileSet: NCMConcatProfileSet; proc: CMConcatCallBackUPP; refCon: UNIV Ptr): CMError;
  1002.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1003.     INLINE $203C, $000C, $0062, $ABEE;
  1004.     {$ENDC}
  1005. PROCEDURE CWDisposeColorWorld(cw: CMWorldRef);
  1006.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1007.     INLINE $203C, $0004, $0001, $ABEE;
  1008.     {$ENDC}
  1009. FUNCTION CWMatchColors(cw: CMWorldRef; VAR myColors: CMColor; count: UInt32): CMError;
  1010.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1011.     INLINE $203C, $000C, $0002, $ABEE;
  1012.     {$ENDC}
  1013. FUNCTION CWCheckColors(cw: CMWorldRef; VAR myColors: CMColor; count: UInt32; VAR result: UInt32): CMError;
  1014.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1015.     INLINE $203C, $0010, $0003, $ABEE;
  1016.     {$ENDC}
  1017. FUNCTION CWMatchBitmap(cw: CMWorldRef; VAR bitmap: CMBitmap; progressProc: CMBitmapCallBackUPP; refCon: UNIV Ptr; VAR matchedBitmap: CMBitmap): CMError;
  1018.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1019.     INLINE $203C, $0010, $002C, $ABEE;
  1020.     {$ENDC}
  1021. FUNCTION CWCheckBitmap(cw: CMWorldRef; {CONST}VAR bitmap: CMBitmap; progressProc: CMBitmapCallBackUPP; refCon: UNIV Ptr; VAR resultBitmap: CMBitmap): CMError;
  1022.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1023.     INLINE $203C, $0014, $002D, $ABEE;
  1024.     {$ENDC}
  1025.  
  1026. { Quickdraw-specific matching }
  1027. FUNCTION CWMatchPixMap(cw: CMWorldRef; VAR myPixMap: PixMap; progressProc: CMBitmapCallBackUPP; refCon: UNIV Ptr): CMError;
  1028.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1029.     INLINE $203C, $0010, $0004, $ABEE;
  1030.     {$ENDC}
  1031. FUNCTION CWCheckPixMap(cw: CMWorldRef; VAR myPixMap: PixMap; progressProc: CMBitmapCallBackUPP; refCon: UNIV Ptr; VAR resultBitMap: BitMap): CMError;
  1032.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1033.     INLINE $203C, $0014, $0007, $ABEE;
  1034.     {$ENDC}
  1035. {$IFC TARGET_API_MAC_OS8 OR TARGET_API_MAC_CARBON }
  1036. FUNCTION NCMBeginMatching(src: CMProfileRef; dst: CMProfileRef; VAR myRef: CMMatchRef): CMError;
  1037.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1038.     INLINE $203C, $000C, $0016, $ABEE;
  1039.     {$ENDC}
  1040. PROCEDURE CMEndMatching(myRef: CMMatchRef);
  1041.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1042.     INLINE $203C, $0004, $000B, $ABEE;
  1043.     {$ENDC}
  1044. PROCEDURE NCMDrawMatchedPicture(myPicture: PicHandle; dst: CMProfileRef; VAR myRect: Rect);
  1045.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1046.     INLINE $203C, $000C, $0017, $ABEE;
  1047.     {$ENDC}
  1048. PROCEDURE CMEnableMatchingComment(enableIt: BOOLEAN);
  1049.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1050.     INLINE $203C, $0002, $000D, $ABEE;
  1051.     {$ENDC}
  1052. FUNCTION NCMUseProfileComment(prof: CMProfileRef; flags: UInt32): CMError;
  1053.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1054.     INLINE $203C, $0008, $003B, $ABEE;
  1055.     {$ENDC}
  1056. {$ENDC}
  1057.  
  1058. {$IFC TARGET_OS_WIN32 }
  1059. FUNCTION CWMatchHBITMAP(cw: CMWorldRef; hBitmap: HBITMAP; progressProc: CMBitmapCallBackUPP; refCon: UNIV Ptr): CMError;
  1060. {$ENDC}  {TARGET_OS_WIN32}
  1061.  
  1062. FUNCTION CMCreateProfileIdentifier(prof: CMProfileRef; ident: CMProfileIdentifierPtr; VAR size: UInt32): CMError;
  1063.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1064.     INLINE $203C, $000C, $0041, $ABEE;
  1065.     {$ENDC}
  1066.  
  1067. { System Profile access }
  1068. FUNCTION CMGetSystemProfile(VAR prof: CMProfileRef): CMError;
  1069.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1070.     INLINE $203C, $0004, $0018, $ABEE;
  1071.     {$ENDC}
  1072. FUNCTION CMSetSystemProfile({CONST}VAR profileFileSpec: FSSpec): CMError;
  1073.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1074.     INLINE $203C, $0004, $0019, $ABEE;
  1075.     {$ENDC}
  1076. FUNCTION NCMSetSystemProfile({CONST}VAR profLoc: CMProfileLocation): CMError;
  1077.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1078.     INLINE $203C, $0004, $0064, $ABEE;
  1079.     {$ENDC}
  1080. FUNCTION CMGetDefaultProfileBySpace(dataColorSpace: OSType; VAR prof: CMProfileRef): CMError;
  1081.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1082.     INLINE $203C, $0008, $005A, $ABEE;
  1083.     {$ENDC}
  1084. FUNCTION CMSetDefaultProfileBySpace(dataColorSpace: OSType; prof: CMProfileRef): CMError;
  1085.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1086.     INLINE $203C, $0008, $005B, $ABEE;
  1087.     {$ENDC}
  1088. {$IFC TARGET_OS_MAC }
  1089. FUNCTION CMGetProfileByAVID(theAVID: AVIDType; VAR prof: CMProfileRef): CMError;
  1090.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1091.     INLINE $203C, $0008, $005C, $ABEE;
  1092.     {$ENDC}
  1093. FUNCTION CMSetProfileByAVID(theAVID: AVIDType; prof: CMProfileRef): CMError;
  1094.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1095.     INLINE $203C, $0008, $005D, $ABEE;
  1096.     {$ENDC}
  1097. {$ENDC}  {TARGET_OS_MAC}
  1098.  
  1099. { Profile Use enumerations }
  1100.  
  1101. CONST
  1102.     cmInputUse                    = 'inpt';
  1103.     cmOutputUse                    = 'outp';
  1104.     cmDisplayUse                = 'dply';
  1105.     cmProofUse                    = 'pruf';
  1106.  
  1107. { Profile access by Use }
  1108. FUNCTION CMGetDefaultProfileByUse(use: OSType; VAR prof: CMProfileRef): CMError;
  1109.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1110.     INLINE $203C, $0008, $0069, $ABEE;
  1111.     {$ENDC}
  1112. FUNCTION CMSetDefaultProfileByUse(use: OSType; prof: CMProfileRef): CMError;
  1113.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1114.     INLINE $203C, $0008, $0079, $ABEE;
  1115.     {$ENDC}
  1116. { Profile Management }
  1117. FUNCTION CMNewProfileSearch(VAR searchSpec: CMSearchRecord; refCon: UNIV Ptr; VAR count: UInt32; VAR searchResult: CMProfileSearchRef): CMError;
  1118.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1119.     INLINE $203C, $0010, $0027, $ABEE;
  1120.     {$ENDC}
  1121. FUNCTION CMUpdateProfileSearch(search: CMProfileSearchRef; refCon: UNIV Ptr; VAR count: UInt32): CMError;
  1122.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1123.     INLINE $203C, $000C, $0028, $ABEE;
  1124.     {$ENDC}
  1125. PROCEDURE CMDisposeProfileSearch(search: CMProfileSearchRef);
  1126.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1127.     INLINE $203C, $0004, $0029, $ABEE;
  1128.     {$ENDC}
  1129. FUNCTION CMSearchGetIndProfile(search: CMProfileSearchRef; index: UInt32; VAR prof: CMProfileRef): CMError;
  1130.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1131.     INLINE $203C, $000C, $002A, $ABEE;
  1132.     {$ENDC}
  1133. FUNCTION CMSearchGetIndProfileFileSpec(search: CMProfileSearchRef; index: UInt32; VAR profileFile: FSSpec): CMError;
  1134.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1135.     INLINE $203C, $000C, $002B, $ABEE;
  1136.     {$ENDC}
  1137. FUNCTION CMProfileIdentifierFolderSearch(ident: CMProfileIdentifierPtr; VAR matchedCount: UInt32; VAR searchResult: CMProfileSearchRef): CMError;
  1138.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1139.     INLINE $203C, $000C, $003F, $ABEE;
  1140.     {$ENDC}
  1141. FUNCTION CMProfileIdentifierListSearch(ident: CMProfileIdentifierPtr; VAR profileList: CMProfileRef; listSize: UInt32; VAR matchedCount: UInt32; VAR matchedList: CMProfileRef): CMError;
  1142.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1143.     INLINE $203C, $0014, $0040, $ABEE;
  1144.     {$ENDC}
  1145. FUNCTION CMIterateColorSyncFolder(proc: CMProfileIterateUPP; VAR seed: UInt32; VAR count: UInt32; refCon: UNIV Ptr): CMError;
  1146.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1147.     INLINE $203C, $0010, $0058, $ABEE;
  1148.     {$ENDC}
  1149. FUNCTION NCMUnflattenProfile(VAR targetLocation: CMProfileLocation; proc: CMFlattenUPP; refCon: UNIV Ptr; VAR preferredCMMnotfound: BOOLEAN): CMError;
  1150.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1151.     INLINE $203C, $0010, $0065, $ABEE;
  1152.     {$ENDC}
  1153. { Utilities }
  1154. {$IFC TARGET_OS_MAC }
  1155. FUNCTION CMGetColorSyncFolderSpec(vRefNum: INTEGER; createFolder: BOOLEAN; VAR foundVRefNum: INTEGER; VAR foundDirID: LONGINT): CMError;
  1156.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1157.     INLINE $203C, $000C, $0011, $ABEE;
  1158.     {$ENDC}
  1159. {$ENDC}  {TARGET_OS_MAC}
  1160.  
  1161. {$IFC TARGET_OS_WIN32 OR TARGET_OS_UNIX }
  1162. FUNCTION CMGetColorSyncFolderPath(createFolder: BOOLEAN; lpBuffer: CStringPtr; uSize: UInt32): CMError;
  1163. {$ENDC}
  1164.  
  1165. FUNCTION CMGetCWInfo(cw: CMWorldRef; VAR info: CMCWInfoRecord): CMError;
  1166.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1167.     INLINE $203C, $0008, $001A, $ABEE;
  1168.     {$ENDC}
  1169. {$IFC TARGET_API_MAC_OS8 }
  1170. FUNCTION CMConvertProfile2to1(profv2: CMProfileRef; VAR profv1: CMProfileHandle): CMError;
  1171.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1172.     INLINE $203C, $0008, $0045, $ABEE;
  1173.     {$ENDC}
  1174. {$ENDC}  {TARGET_API_MAC_OS8}
  1175.  
  1176. FUNCTION CMGetPreferredCMM(VAR cmmType: OSType; VAR preferredCMMnotfound: BOOLEAN): CMError;
  1177.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1178.     INLINE $203C, $0008, $005E, $ABEE;
  1179.     {$ENDC}
  1180. FUNCTION CMIterateCMMInfo(proc: CMMIterateUPP; VAR count: UInt32; refCon: UNIV Ptr): CMError;
  1181.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1182.     INLINE $203C, $000C, $0063, $ABEE;
  1183.     {$ENDC}
  1184. FUNCTION CMGetColorSyncVersion(VAR version: UInt32): CMError;
  1185.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1186.     INLINE $203C, $0004, $0066, $ABEE;
  1187.     {$ENDC}
  1188. FUNCTION CMLaunchControlPanel(flags: UInt32): CMError;
  1189. { ColorSpace conversion functions }
  1190. FUNCTION CMConvertXYZToLab({CONST}VAR src: CMColor; {CONST}VAR white: CMXYZColor; VAR dst: CMColor; count: UInt32): CMError;
  1191.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1192.     INLINE $203C, $0010, $004B, $ABEE;
  1193.     {$ENDC}
  1194. FUNCTION CMConvertLabToXYZ({CONST}VAR src: CMColor; {CONST}VAR white: CMXYZColor; VAR dst: CMColor; count: UInt32): CMError;
  1195.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1196.     INLINE $203C, $0010, $004C, $ABEE;
  1197.     {$ENDC}
  1198. FUNCTION CMConvertXYZToLuv({CONST}VAR src: CMColor; {CONST}VAR white: CMXYZColor; VAR dst: CMColor; count: UInt32): CMError;
  1199.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1200.     INLINE $203C, $0010, $004D, $ABEE;
  1201.     {$ENDC}
  1202. FUNCTION CMConvertLuvToXYZ({CONST}VAR src: CMColor; {CONST}VAR white: CMXYZColor; VAR dst: CMColor; count: UInt32): CMError;
  1203.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1204.     INLINE $203C, $0010, $004E, $ABEE;
  1205.     {$ENDC}
  1206. FUNCTION CMConvertXYZToYxy({CONST}VAR src: CMColor; VAR dst: CMColor; count: UInt32): CMError;
  1207.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1208.     INLINE $203C, $000C, $004F, $ABEE;
  1209.     {$ENDC}
  1210. FUNCTION CMConvertYxyToXYZ({CONST}VAR src: CMColor; VAR dst: CMColor; count: UInt32): CMError;
  1211.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1212.     INLINE $203C, $000C, $0050, $ABEE;
  1213.     {$ENDC}
  1214. FUNCTION CMConvertRGBToHLS({CONST}VAR src: CMColor; VAR dst: CMColor; count: UInt32): CMError;
  1215.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1216.     INLINE $203C, $000C, $0051, $ABEE;
  1217.     {$ENDC}
  1218. FUNCTION CMConvertHLSToRGB({CONST}VAR src: CMColor; VAR dst: CMColor; count: UInt32): CMError;
  1219.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1220.     INLINE $203C, $000C, $0052, $ABEE;
  1221.     {$ENDC}
  1222. FUNCTION CMConvertRGBToHSV({CONST}VAR src: CMColor; VAR dst: CMColor; count: UInt32): CMError;
  1223.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1224.     INLINE $203C, $000C, $0053, $ABEE;
  1225.     {$ENDC}
  1226. FUNCTION CMConvertHSVToRGB({CONST}VAR src: CMColor; VAR dst: CMColor; count: UInt32): CMError;
  1227.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1228.     INLINE $203C, $000C, $0054, $ABEE;
  1229.     {$ENDC}
  1230. FUNCTION CMConvertRGBToGray({CONST}VAR src: CMColor; VAR dst: CMColor; count: UInt32): CMError;
  1231.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1232.     INLINE $203C, $000C, $0055, $ABEE;
  1233.     {$ENDC}
  1234. FUNCTION CMConvertXYZToFixedXYZ({CONST}VAR src: CMXYZColor; VAR dst: CMFixedXYZColor; count: UInt32): CMError;
  1235.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1236.     INLINE $203C, $000C, $0056, $ABEE;
  1237.     {$ENDC}
  1238. FUNCTION CMConvertFixedXYZToXYZ({CONST}VAR src: CMFixedXYZColor; VAR dst: CMXYZColor; count: UInt32): CMError;
  1239.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1240.     INLINE $203C, $000C, $0057, $ABEE;
  1241.     {$ENDC}
  1242.  
  1243. { PS-related }
  1244. FUNCTION CMGetPS2ColorSpace(srcProf: CMProfileRef; flags: UInt32; proc: CMFlattenUPP; refCon: UNIV Ptr; VAR preferredCMMnotfound: BOOLEAN): CMError;
  1245.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1246.     INLINE $203C, $0014, $002E, $ABEE;
  1247.     {$ENDC}
  1248. FUNCTION CMGetPS2ColorRenderingIntent(srcProf: CMProfileRef; flags: UInt32; proc: CMFlattenUPP; refCon: UNIV Ptr; VAR preferredCMMnotfound: BOOLEAN): CMError;
  1249.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1250.     INLINE $203C, $0014, $002F, $ABEE;
  1251.     {$ENDC}
  1252. FUNCTION CMGetPS2ColorRendering(srcProf: CMProfileRef; dstProf: CMProfileRef; flags: UInt32; proc: CMFlattenUPP; refCon: UNIV Ptr; VAR preferredCMMnotfound: BOOLEAN): CMError;
  1253.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1254.     INLINE $203C, $0018, $0030, $ABEE;
  1255.     {$ENDC}
  1256. FUNCTION CMGetPS2ColorRenderingVMSize(srcProf: CMProfileRef; dstProf: CMProfileRef; VAR vmSize: UInt32; VAR preferredCMMnotfound: BOOLEAN): CMError;
  1257.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1258.     INLINE $203C, $0010, $003D, $ABEE;
  1259.     {$ENDC}
  1260.  
  1261. { ColorSync 1.0 functions which have parallel 2.0 counterparts }
  1262. {$IFC TARGET_API_MAC_OS8 }
  1263. FUNCTION CWNewColorWorld(VAR cw: CMWorldRef; src: CMProfileHandle; dst: CMProfileHandle): CMError;
  1264.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1265.     INLINE $203C, $000C, $0000, $ABEE;
  1266.     {$ENDC}
  1267. FUNCTION ConcatenateProfiles(thru: CMProfileHandle; dst: CMProfileHandle; VAR newDst: CMProfileHandle): CMError;
  1268.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1269.     INLINE $203C, $000C, $000C, $ABEE;
  1270.     {$ENDC}
  1271. FUNCTION CMBeginMatching(src: CMProfileHandle; dst: CMProfileHandle; VAR myRef: CMMatchRef): CMError;
  1272.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1273.     INLINE $203C, $000C, $000A, $ABEE;
  1274.     {$ENDC}
  1275. PROCEDURE CMDrawMatchedPicture(myPicture: PicHandle; dst: CMProfileHandle; VAR myRect: Rect);
  1276.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1277.     INLINE $203C, $000C, $0009, $ABEE;
  1278.     {$ENDC}
  1279. FUNCTION CMUseProfileComment(profile: CMProfileHandle): CMError;
  1280.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1281.     INLINE $203C, $0004, $0008, $ABEE;
  1282.     {$ENDC}
  1283. PROCEDURE CMGetProfileName(myProfile: CMProfileHandle; VAR IStringResult: CMIString);
  1284.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1285.     INLINE $203C, $0008, $000E, $ABEE;
  1286.     {$ENDC}
  1287. FUNCTION CMGetProfileAdditionalDataOffset(myProfile: CMProfileHandle): LONGINT;
  1288.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1289.     INLINE $203C, $0004, $000F, $ABEE;
  1290.     {$ENDC}
  1291.  
  1292. { ProfileResponder functions }
  1293. FUNCTION GetProfile(deviceType: OSType; refNum: LONGINT; aProfile: CMProfileHandle; VAR returnedProfile: CMProfileHandle): CMError;
  1294.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1295.     INLINE $203C, $0010, $0005, $ABEE;
  1296.     {$ENDC}
  1297. FUNCTION SetProfile(deviceType: OSType; refNum: LONGINT; newProfile: CMProfileHandle): CMError;
  1298.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1299.     INLINE $203C, $000C, $0006, $ABEE;
  1300.     {$ENDC}
  1301. FUNCTION SetProfileDescription(deviceType: OSType; refNum: LONGINT; deviceData: LONGINT; hProfile: CMProfileHandle): CMError;
  1302.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1303.     INLINE $203C, $0010, $0010, $ABEE;
  1304.     {$ENDC}
  1305. FUNCTION GetIndexedProfile(deviceType: OSType; refNum: LONGINT; search: CMProfileSearchRecordHandle; VAR returnProfile: CMProfileHandle; VAR index: LONGINT): CMError;
  1306.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1307.     INLINE $203C, $0014, $0012, $ABEE;
  1308.     {$ENDC}
  1309. FUNCTION DeleteDeviceProfile(deviceType: OSType; refNum: LONGINT; deleteMe: CMProfileHandle): CMError;
  1310.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1311.     INLINE $203C, $000C, $0013, $ABEE;
  1312.     {$ENDC}
  1313.  
  1314. {$IFC OLDROUTINENAMES }
  1315. { constants }
  1316.  
  1317. TYPE
  1318.     CMFlattenProc                        = CMFlattenProcPtr;
  1319.     CMBitmapCallBackProc                = CMBitmapCallBackProcPtr;
  1320.     CMProfileFilterProc                    = CMProfileFilterProcPtr;
  1321.  
  1322. CONST
  1323.     qdSystemDevice                = 'sys ';
  1324.     qdGDevice                    = 'gdev';
  1325.  
  1326.  
  1327.     kMatchCMMType                = $00000001;
  1328.     kMatchApplProfileVersion    = $00000002;
  1329.     kMatchDataType                = $00000004;
  1330.     kMatchDeviceType            = $00000008;
  1331.     kMatchDeviceManufacturer    = $00000010;
  1332.     kMatchDeviceModel            = $00000020;
  1333.     kMatchDeviceAttributes        = $00000040;
  1334.     kMatchFlags                    = $00000080;
  1335.     kMatchOptions                = $00000100;
  1336.     kMatchWhite                    = $00000200;
  1337.     kMatchBlack                    = $00000400;
  1338.  
  1339. { types }
  1340.  
  1341. TYPE
  1342.     CMYKColor                            = CMCMYKColor;
  1343.     CMYKColorPtr                         = ^CMYKColor;
  1344.     CWorld                                = CMWorldRef;
  1345.     CMGamutResult                        = ^LONGINT;
  1346. { functions }
  1347. PROCEDURE EndMatching(myRef: CMMatchRef);
  1348.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1349.     INLINE $203C, $0004, $000B, $ABEE;
  1350.     {$ENDC}
  1351. PROCEDURE EnableMatching(enableIt: BOOLEAN);
  1352.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1353.     INLINE $203C, $0002, $000D, $ABEE;
  1354.     {$ENDC}
  1355. FUNCTION GetColorSyncFolderSpec(vRefNum: INTEGER; createFolder: BOOLEAN; VAR foundVRefNum: INTEGER; VAR foundDirID: LONGINT): CMError;
  1356.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1357.     INLINE $203C, $000C, $0011, $ABEE;
  1358.     {$ENDC}
  1359. FUNCTION BeginMatching(src: CMProfileHandle; dst: CMProfileHandle; VAR myRef: CMMatchRef): CMError;
  1360.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1361.     INLINE $203C, $000C, $000A, $ABEE;
  1362.     {$ENDC}
  1363. PROCEDURE DrawMatchedPicture(myPicture: PicHandle; dst: CMProfileHandle; VAR myRect: Rect);
  1364.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1365.     INLINE $203C, $000C, $0009, $ABEE;
  1366.     {$ENDC}
  1367. FUNCTION UseProfile(profile: CMProfileHandle): CMError;
  1368.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1369.     INLINE $203C, $0004, $0008, $ABEE;
  1370.     {$ENDC}
  1371. PROCEDURE GetProfileName(myProfile: CMProfileHandle; VAR IStringResult: CMIString);
  1372.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1373.     INLINE $203C, $0008, $000E, $ABEE;
  1374.     {$ENDC}
  1375. FUNCTION GetProfileAdditionalDataOffset(myProfile: CMProfileHandle): LONGINT;
  1376.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1377.     INLINE $203C, $0004, $000F, $ABEE;
  1378.     {$ENDC}
  1379. {$ENDC}
  1380. {  Deprecated stuff }
  1381.  
  1382. { PrGeneral parameter blocks }
  1383.  
  1384. TYPE
  1385.     TEnableColorMatchingBlkPtr = ^TEnableColorMatchingBlk;
  1386.     TEnableColorMatchingBlk = RECORD
  1387.         iOpCode:                INTEGER;
  1388.         iError:                    INTEGER;
  1389.         lReserved:                LONGINT;
  1390.         hPrint:                    THPrint;
  1391.         fEnableIt:                BOOLEAN;
  1392.         filler:                    SInt8;
  1393.     END;
  1394.  
  1395.     TRegisterProfileBlkPtr = ^TRegisterProfileBlk;
  1396.     TRegisterProfileBlk = RECORD
  1397.         iOpCode:                INTEGER;
  1398.         iError:                    INTEGER;
  1399.         lReserved:                LONGINT;
  1400.         hPrint:                    THPrint;
  1401.         fRegisterIt:            BOOLEAN;
  1402.         filler:                    SInt8;
  1403.     END;
  1404.  
  1405. {$ENDC}  {TARGET_API_MAC_OS8}
  1406.  
  1407. {$ALIGN RESET}
  1408. {$POP}
  1409.  
  1410. {$SETC UsingIncludes := CMApplicationIncludes}
  1411.  
  1412. {$ENDC} {__CMAPPLICATION__}
  1413.  
  1414. {$IFC NOT UsingIncludes}
  1415.  END.
  1416. {$ENDC}
  1417.